#findall 查找所有
import re

str1='hello 123 hello'

pattern_01=re.compile('\w+')

result_03=pattern_01.finditer(str1,pos=5,endpos=12)
print(type(result_03))

for r in result_03:
    print(r.group())